package com.zoe.bean;

import org.springframework.stereotype.Component;

/**
 * @author ZhangBaoGuo
 * @date 20/10/27
 */
@Component
public class Student {
    private Integer age;
    private String name;

    public Student() {
        System.out.println("无参构造学生");
    }

    public Student(Integer age, String name) {
        this.age = age;
        this.name = name;
        System.out.println("带参数构造学生");
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
            "age=" + age +
            ", name='" + name + '\'' +
            '}';
    }
}
